Before your application can write data using a data handler component, you must open a write path to the current data reference. Use the DataHOpenForWrite function to request write access to the current data reference. Once you have gained write access to the data reference, data handler components provide both high- and low-level write functions.
Note
QuickTime for Windows version 2.1.1 or earlier does not support writing movie data.
The high-level function, DataHPutData , allows you to easily append data to the end of the container identified by a data reference. Except when capturing movie data using the sequence grabber component, the Movie Toolbox uses this call when writing data to movie files. However, this function does not allow your application to write to any location other than the end of the container. In addition, this is a synchronous operation, so control is not returned to your program until the write is complete. As a result, this function is not well-suited to high-performance write operations, such as would be required to capture a movie.
If you need a more flexible write facility, or one with higher performance characteristics, you can use the DataHWrite function. This function is intended to support high-speed writes, suitable for movie capture operations. For example, Apple's sequence grabber component uses this data handler function to capture movies.
When you call this function, you provide detailed information specifying the location in the container that is to receive the data. The data handler returns control to your application immediately, and then processes the request asynchronously. When the data handler completes the request, it calls your data-handler completion function to report that the request has been satisfied, see "Completion Function" for more information on the data-handler completion function.
In addition to the DataHWrite function, data handler components provide several other "helper" functions that allow you to create new movie containers and prepare them for a movie capture operation.
For more information on all of these functions, see "Writing Movie Data" .
| Previous | Chapter Contents | Chapter Top | Next |